const express = require('express');
const article = express.Router();

// 添加草稿
article.post('/save',require('./article/save'))
// 发布文章
article.post('/publish',require('./article/publish'))
//分页查询已发布文章数据
article.get('/',require('./article/articlelist'))
//关键词搜索
article.get('/seach',require('./article/seach'))
//分页查询草稿数据
article.get('/save',require('./article/articlelist'))
// 文章详情
article.get('/:id',require('./article/article'))
// 分类分页展示
article.get('/class/:id/:page',require('./article/class'))
// 时间轴分页查询
article.get('/archives/:page',require('./article/timeline'))
// 删除文章
article.delete('/:id',require('./article/delarticle'))
// 更换分类
article.put('/class/:id',require('./article/editclass'))
// 文章修改
article.put('/edit/:id',require('./article/edit'))
// 草稿转发布
article.put('/status/:id',require('./article/change'))

module.exports=article;
